package main.java.design.builder;

/**
 * <p>
 *     表示被构造的复杂对象。ConcreteBuilder创建该产品的内部表示并定义它的装配过程，包含定义组成部件的类，
 *     包括将这些部件装配成最终产品的接口。
 * </p>
 *
 * @author : wangdejian
 * @version 1.0
 * @date : 2020/6/11 21:50
 */
public class Product {
    // 产品名称，必须有
    private String name;
    // 产品说明，必须有
    private String explain;
    // 生产日期,必须有
    private String dateOfManufacture;

    // 产品厂商联系电话，可选
    private String phone;
    // 产品厂商地址，可选
    private String address;


    public Product(String name, String explain, String dateOfManufacture) {
        this.name = name;
        this.explain = explain;
        this.dateOfManufacture = dateOfManufacture;
    }

    public String getDateOfManufacture() {
        return dateOfManufacture;
    }

    public void setDateOfManufacture(String dateOfManufacture) {
        this.dateOfManufacture = dateOfManufacture;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getExplain() {
        return explain;
    }

    public void setExplain(String explain) {
        this.explain = explain;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Product{" +
                "name='" + name + '\'' +
                ", explain='" + explain + '\'' +
                ", phone='" + phone + '\'' +
                ", address='" + address + '\'' +
                ", dateOfManufacture='" + dateOfManufacture + '\'' +
                '}';
    }

}
